<div class="bjui-pageHeader">
        <form id="pagerForm" data-toggle="ajaxsearch" action="{url}" method="post">
                <input type="hidden" name="pageSize" value="{$numPerPage}" >
                <input type="hidden" name="pageCurrent" value="{$currentPage}">
                <input type="hidden" name="orderField" value="{$orderField}">
                <input type="hidden" name="orderDirection" value="{$orderDirection}">
                <label>订单状态：</label>
                <select name="status" class="combox" data-toggle="selectpicker" >
                        <option value="" >请选择</option>
                        <option value="0" {eq name="_REQUEST.status|default=''" value="0"}selected{/eq}>待受理</option>
                        <option value="1" {eq name="_REQUEST.status|default=''" value="1"}selected{/eq}>已受理</option>
                        <option value="2" {eq name="_REQUEST.status|default=''" value="2"}selected{/eq}>已确认</option>
                        <option value="3" {eq name="_REQUEST.status|default=''" value="3"}selected{/eq}>已支付</option>
                        <option value="4" {eq name="_REQUEST.status|default=''" value="4"}selected{/eq}>已完成</option>
                        <option value="5" {eq name="_REQUEST.status|default=''" value="5"}selected{/eq}>已取消</option>
                </select>
                <label>线路ID：</label>
                <input name="tours_id" type="text" value="{$_REQUEST.tours_id|default=''}" class="form-control" size="15" />
                <label>订单ID：</label>
                <input name="order_id" type="text" value="{$_REQUEST.order_id|default=''}" class="form-control" size="15" />
                <label>出发日期：</label>
                <input name="go_date_start" type="text" data-toggle="datepicker" value="{$_REQUEST.go_date_start|default=''}" readonly="true" />
                至<input name="go_date_end" type="text" class="left date" value="{$_REQUEST.go_date_end|default=''}" data-toggle="datepicker" readonly="true" />
                <label>下单日期：</label>
                <input name="date_start" type="text" data-toggle="datepicker" value="{$_REQUEST.date_start|default=''}" readonly="true" />
                至<input name="date_end" type="text" class="left date" value="{$_REQUEST.date_end|default=''}" data-toggle="datepicker" readonly="true" />
                <button type="submit"  class="btn-default" data-icon="search">查询</button>
                <a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true);" data-icon="undo">清空查询</a>
                <div class="bjui-searchBar">
                        <ul >
                                <li>

                                </li>
                        </ul>
                </div>
        </form>

</div>

<div class="bjui-pageContent">
        <table data-toggle="tablefixed" data-height='auto' data-width="100%" data-layout-h="0" data-nowrap="true">
                <thead>
                        <tr>
                                <th align="center" width="120">订单编号</th>				
                                <th>预订产品</th>
                                <th align="center" width="80">联系人</th>
                                <th align="center" width="80">出发日期</th>
                                <th align="center" width="80">出游人数</th>
                                <th align="center" width="80">订单总额/应收总额</th>
                                <th align="center" width="120">下单时间</th>
                                <th align="center" width="80">订单状态</th>
                                <th align="center" width="80">受理人</th>
                                <th width="150">操作</th>
                        </tr>
                </thead>
                <tbody>
                        {neq name="list" value=''}
                        {volist name='list' id='vo'}
                        <tr>
                                <td align='center'>{$vo.order_id|default=''}</td>					
                                <td align='center'>
                                        <font style="color: #390">[ID:{$vo.tours_id}]</font>
                                        <a href="{$vo.tours_url}" target="_blank" style="color: #333;">{$vo.tours_title}</a>
                                        <font style="color: #C0860A">[供：{$vo.supplier_name}]</font>
                                </td>
                                <td align='center' style="color: #05c">{$vo.username}</td>
                                <td align='center'>{$vo.go_date}</td>             
                                <td align='center'>{$vo.adult}成 {$vo.child}童</td>
                                <td align='center' style="color: #F60">{$vo['adult']*$vo['adult_price']+$vo['child']*$vo['child_price']+$vo['insure_num']*$vo['insure_price']}/{$vo.order_payment|default=''}</td>
                                <td align='center'>{$vo.create_time|date='Y-m-d H:i',###}</td>

                                {switch name="vo.status"}
                                {case value="0"}<td align='center' style="color:#F60;">新订单</td>{/case}
                                {case value="1"}<td align='center' style="color:#390;">已受理</td>{/case}
                                {case value="2"}<td align='center' style="color:#F00;">待支付</td>{/case}
                                {case value="3"}<td align='center' style="color:#06F;">已支付</td>{/case}
                                {case value="4"}<td align='center' style="color:#000;">已完成</td>{/case}
                                {case value="5"}<td align='center' style="color:#999;">已取消</td>{/case}
                                {/switch}

                                <td align='center'>{$vo.member_name|default="--"}</td>
                                <td align='center'>
                                        <a  href="{:U('Sales/order_detail?orderid='.$vo['order_id'])}" class="btn btn-green" data-height="600"  data-width="700" data-toggle="dialog" data-mask='true' data-id="dialog-mask" data-title="查看详情" data-icon="search"></a>

                                        {between name="vo.status" value="0,5"}
                                        {empty name="vo.mid"}
                                        <a href="{:U('Sales/order_accept?orderid='.$vo['order_id'])}" data-icon="plus"  class="btn btn-orange" data-toggle="doajax" data-confirm-msg="确定要接受订单吗？"></a>
                                        {/empty}				
                                        {/between}
                                        {eq name="vo.mid" value="$mid"}
                                        {eq name="vo.status" value="1"}
                                        <a href="{:U('Sales/order_handover?orderid='.$vo['order_id'])}" class="btn btn-red"  data-toggle="dialog" data-mask='true' data-id="dialog-mask" data-icon='fa-crosshairs'  title='移交'></a>
                                        <a  href="{:U('Sales/order_add?orderid='.$vo['order_id'])}" class="btn btn-green" data-height="600"  data-width="700" data-toggle="dialog" data-mask='true' data-id="dialog-mask" data-title="编辑订单" data-icon='edit'></a>				
                                        <br/><a href="{:U('Sales/order_affirm?orderid='.$vo['order_id'])}"  class="btn btn-red" data-toggle="doajax" data-confirm-msg="确认订单？是否与客户确认完毕？确定后，即可进入支付状态，且不可再编辑和移交，你确定？" title="确定" data-icon='check'></a>
                                        {/eq}
                                        {if condition="$vo['status'] gt 1 && $vo['status'] lt 4"}
                                        <a data-confirm-msg="完成订单？客户支付才可完成订单，你确定？"title="完成" class="btn btn-orange" href="{:U('Sales/order_complete?orderid='.$vo['order_id'])}" data-toggle="doajax" data-icon='fa-money'></a>
                                        {/if}
                                        {if condition="$vo['status'] gt 0 && $vo['status'] lt 3"}
                                        <a href="{:U('Sales/order_over?orderid='.$vo['order_id'])}"  class="btn btn-red" data-toggle="doajax" data-confirm-msg="取消订单？是否与客户确认完毕？取消后不可恢复，您确定？" title="取消" data-icon='trash'></a>
                                        {/if}
                                        {/eq}
                                </td>
                        </tr>
                        {/volist}
                        {else /}
                        <tr><td colspan="15" align="center">暂无新订单</td></tr>
                        {/neq}
                </tbody>
        </table>

</div>
<div class="bjui-pageFooter">
        <div class="pages">
                <span> 每页&nbsp;</span>
                <div class="selectPagesize">
                        <select data-toggle="selectpicker" data-toggle-change="changepagesize" class="show-tick" >
                                <option {eq name="numPerPage" value="20"} selected="selected" {/eq} value="20">20</option>
                                <option {eq name='numPerPage' value='40'} selected="selected" {/eq} value="40">40</option>
                                <option {eq name='numPerPage' value='120'} selected="selected" {/eq} value="120">120</option>
                                <option {eq name='numPerPage' value='150'} selected="selected" {/eq} value="150">150</option>
                        </select>
                </div>
                <span>&nbsp;条,共 {$totalCount} 条 </span>


        </div>
        <div class="pagination-box" data-toggle="pagination" data-total="{$totalCount}" data-page-size="{$numPerPage}" data-page-current="{$currentPage}">
        </div>
</div>


